<Project>
  <PropertyGroup>
    <!-- These need to be set here because the root Directory.Build.props sets up the intermediate path early -->
    <Configuration>Release</Configuration>
    <OutputType>Exe</OutputType>

    <TestRuntime>true</TestRuntime>
    <Scenario>WasmTestOnBrowser</Scenario>
    <TestArchiveTestsRoot>$(TestArchiveRoot)browseronly/</TestArchiveTestsRoot>
    <TestArchiveTestsDir>$(TestArchiveTestsRoot)$(OSPlatformConfig)/</TestArchiveTestsDir>
    <DefineConstants>$(DefineConstants);TARGET_BROWSER</DefineConstants>
    <ExpectedExitCode>42</ExpectedExitCode>
  </PropertyGroup>

  <Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props, '$(MSBuildThisFileDirectory)..'))" />

  <ItemGroup Condition="'$(IsWasmTestProject)' != 'false'">
    <Compile Include="Program.cs" />
    <Content Include="index.html" CopyToOutputDirectory="Always" />
    <WasmExtraFilesToDeploy Include="index.html" />
    <WasmExtraFilesToDeploy Include="main.js" />
  </ItemGroup>

  <PropertyGroup>
    <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
    <OutputPath>$(RepoRoot)artifacts\bin\$(MSBuildProjectName)</OutputPath>
    <_InTreeEmSdk>$(BrowserProjectRoot)emsdk</_InTreeEmSdk>
    <EMSDK_PATH Condition="'$(EMSDK_PATH)' == '' and Exists($(_InTreeEmSdk))">$(_InTreeEmSdk)</EMSDK_PATH>
  </PropertyGroup>
</Project>
